<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

    <div class="field">
	    <div class="label">Position:</div>
	    <div class="input">
            <c:if test="${form.editable}">
            <form:select id="position" path="person.position.id">
                <form:options items="${positions}" itemLabel="name" itemValue="id"  />
            </form:select>
            <script type="text/javascript">
                Spring.addDecoration(new Spring.ElementDecoration({
                elementId : "position",
                widgetType : "dijit.form.FilteringSelect",
                widgetAttrs : {
                    required: "false"
                }}));
            </script>
            </c:if>
            <c:if test="${!form.editable}">
            <div class="output">${form.person.position.name}</div>
            </c:if>
	    </div>
	</div>